home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / MolViewer / Source / D3View.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  3.0 KB  |  126 lines

  1. /* 3DView.h   Copyright 1993 Steve Ludtke */
  2. /* This is a N3DCamera subclass which displays molecules. */
  3. /* DrawPS handles the Quick mode */
  4.  
  5. #import <3Dkit/N3DCamera.h>
  6.  
  7. void *timer; /* timer for spinning, etc ... */
  8. void itstime(DPSTimedEntry entry,double now,id call);
  9.  
  10. @interface D3View:N3DCamera
  11. {
  12. id mode;            /* mouse mode selector (unused)*/
  13. id controller;        /* points to MolObj */
  14. id shape;            /* shape for rendering molecules */
  15. id ambLight;        /* ambient light source */
  16. id aLight;            /* directional light source */
  17. id flagSel;            /* flag selector */
  18. id AICV;            /* icon view */
  19. id AIMG,AIMGS[8];    /* images for animation of icon */
  20. float chi,theta,phi,dchi,dtheta;    /* viewing angles/speeds */
  21. float lchi,ltheta;    /* light angle */
  22. float edist;        /* distance between viewer and origin */
  23. int Rmode,Rflags;    /* display mode/flags */
  24. char initflag;        /* flag so timer knows the first time it's called */
  25. Molecule *mol;        /* As usual, this points to the molecule array */
  26. int nmol;            /* # of molecules */
  27. int minshape;        /* fitting  (unused) */
  28. struct ELINFO *elinfo;    /* element info table */
  29. int busy;            /* busy flag to prefent server crash from QRM bug */
  30. int useColor;        /* color display flag */
  31. char *bpath;        /* path to MolViewer.app */
  32.  
  33. int animicon;        /* animate icon flag */
  34. NXPoint Ior1,Ior2;    /* icon animation ref points */
  35.  
  36. float path[3000];    /* user path data */
  37. int pathc;
  38. char ops[1500];
  39. }
  40.  
  41.  
  42. -initFrame:(NXRect *)myrect;
  43. -free;
  44.  
  45. /* rescales coord. system after size chaged */
  46. -superviewSizeChanged:(const NXSize *)oldsize;
  47.  
  48. /* change viewing angle */
  49. -setAng:(float)chi :(float)theta :(float)Phi;
  50.  
  51. /* used to do mouse spinning */
  52. -mouseDown:(NXEvent *)event;
  53.  
  54. /* points to controller object, usually set with IB instead */
  55. -setcontroller:del;
  56.  
  57. /* called by timer to do one time step */
  58. -step;
  59.  
  60. -(int)acceptsFirstMouse;
  61.  
  62. /* display new data */
  63. -zoom:sender;
  64.  
  65. /* toggles dchi=0 on and off */
  66. -togFreeze:sender;
  67.  
  68. /* dump .rib file from 3d view */
  69. - dumpRib:sender;
  70.  
  71. /* currently does nothing */
  72. - renderSelf:(RtToken)context;
  73.  
  74. /* sets intensity of ambient light */
  75. - setAmbLight:sender;
  76.  
  77. /* sets intensity of distant light */
  78. - setLight:sender;
  79.  
  80. /* sets chi of distant light */
  81. - setLightX:sender;
  82.  
  83. /* sets theta of distant light */
  84. - setLightY:sender;
  85.  
  86. /* sets rendering mode */
  87. - setMode:sender;
  88.  
  89. /* prints window with white background */
  90. - printPS:sender;
  91.  
  92. /* set drawing flags */
  93. - setFlags:sender;
  94.  
  95. -setData:(Molecule *)Mol :(int)Nmol :(struct ELINFO *)Elinfo;
  96.  
  97. /* set camera<->molecule distance */
  98. -setEDist:sender;
  99.  
  100. /* set 3rd angle (other 2 mouse drag controlled) */
  101. -setPhi:sender;
  102.  
  103. /* generate animation */
  104. -ribRot:sender;
  105.  
  106. /* used in fitting */
  107. -togMin:sender;
  108.  
  109. -drawPS:(NXRect *)rects :(int)rectCount;
  110.  
  111. /* eps dump of screen */
  112. -dumpEPS:sender;
  113.  
  114. /* change color display flag */
  115. -setColor:sender;
  116.  
  117. /* initialization stuff that must wait for everything to be loaded */
  118. - appDidInit: sender;
  119.  
  120. /* dump a POV compatible file (used to be dkb) */
  121. -dkbDump:sender;
  122.  
  123. /* supposed to help with QRM bug */
  124. - flushRIB;
  125. @end
  126.